package com.sky.mapper;

import com.sky.entity.DishFlavor;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DishFlavorMapper {
	@Insert("insert into sky_take_out.dish_flavor (dish_id, name, value)\n" +
			"        values (#{dishId}, #{name}, #{value})")
	void insert(DishFlavor dishFlavor);
	
	void delete(List<Long> ids);
	
	List<DishFlavor> getBy(Long... ids);
	
	@Select("select * from sky_take_out.dish_flavor where dish_id = #{dishId}")
	List<DishFlavor> getByDishId(Long dishId);
}
